import request from '../utils/http/index'
import { IBannerRes, INewSongRes, ISongListRes } from '../type/home'

/**
 * 获取banner
 * @param params
 */
export function banner (params: Record<string, string | number>) {
  return request<IBannerRes>({
    url: '/banner',
    method: 'get',
    params
  })
}

/**
 * 获取推荐歌单
 * @param params
 */
export function querySongList (params: Record<string, string | number>) {
  return request<ISongListRes>({
    url: '/personalized',
    method: 'get',
    params
  })
}

/**
 * 获取推荐新歌曲
 */
export function queryNewSong (params: Record<string, any>) {
  return request<INewSongRes>({
    url: '/personalized/newsong',
    method: 'get',
    params
  })
}
